﻿using IM.Easy.Entity.Gen;
using IM.Easy.Infrastructure.Query;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.GenServices.Dtos
{
    public class GenTableQueryDto : QueryBase
    {
        /// <summary>
        /// 表名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 表的描述
        /// </summary>
        public string Desc { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? BeginTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }
    }
    public class GenTableDto
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 表名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 所在库名
        /// </summary>
        public string Schema { get; set; }

        /// <summary>
        /// 表的描述
        /// </summary>
        public string Desc { get; set; }

        /// <summary>
        /// 实体名称
        /// </summary>
        public string EntityName { get; set; }

        /// <summary>
        /// 作者
        /// </summary>
        public string Author { get; set; }

        public DateTime? CreatedAt { get; set; }

        public long CreatedBy { get; set; }
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 列信息
        /// </summary>
        public List<GenTableColumnDto> Columns { get; set; }

        /// <summary>
        /// 基本选项信息
        /// </summary>
        public GenTableOptionDto Options { get; set; }
    }
}
